/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package test;
import fri.businessLayer.*;
import fri.daolayer.HistoryDAO;
import fri.daolayer.PaymentCodeDAO;
import fri.daolayer.UserDAO;
import fri.daolayer.UserMoneyDAO;
import fri.entiry.*;
import java.util.Hashtable;
import java.util.List;
import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.swing.JOptionPane;
/**
 *
 * @author NguyenDongUIT
 */
public class TEST {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        /*
        List<FrHistory> historys=HistoryDAO.getHistoryByUserIdAndState("7934d805-5d8f-11e2-ab88-002622d1a6de", 0);
        for(int i=0;i<historys.size();i++)
        {
            System.out.println(historys.get(i).getDateCreated());
        }
         
        */
        /*
        
        if(PaymentCodeDAO.getPaymentcode("") !=null)
        {
            System.out.println("OK");
        }
        else
            System.out.println("Fail");
            */
        
       // HistoryDAO.addHistory("23bc7013-5d8f-11e2-ab88-002622d1a6de", "ma no", 1);
        
        //FrUsermoney user=UserMoneyDAO.getUserMoneyByUICurrency("23bc7013-5d8f-11e2-ab88-002622d1a6de", 1);
        //System.out.println(UserMoneyDAO.getUserMoneyByUICurrency("23bc7013-5d8f-11e2-ab88-002622d1a6de", 1));
        
        System.out.println(PaymentCodeDAO.applyPaymentCode("23bc7013-5d8f-11e2-ab88-002622d1a6de", "15ff96"));
        //UserMoneyDAO.subtractUserMoney("ddee512c-5d8e-11e2-ab88-002622d1a6de", 1000, 1);
        
        //System.out.println(PaymentCodeDAO.generateCode("23bc7013-5d8f-11e2-ab88-002622d1a6de", "35afd3a8-5d64-11e2-953d-002622d1a6de", 1, 890, "tien an nhau", 1));
        
       
    }
}
